﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Collections;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Audio;


public class AssetLibrary
{
    /**
     * The asset library holds a list of all graphic assets objects in the game. The asset objects themselves hold the individual sprite sheets, 
     * animation sheets, menu art, gui, and cutscene images. It is a Singleton.
     */
    
    /**
     * assetType is an enumeration of all particular categories of assets
     * 
     */
    public enum assetType { 
        BUILDINGS, 
        ENVIRONMENT, 
        GUI, 
        HERO,
        HERO_RUN, 
        HERO_IDLE, 
        MISSION_OBJECT, 
        PARTICLES, 
        PROFESSOR, 
        SEWER, 
        STEVE, 
        STREET, 
        DEBRIS,
        TEST,
        MENU,
        OUTLINE,
        ARROW,
        USE,
        LOADING_DOCK,
        STATIC_WORLD_OBJECTS,
        HAZARD, 
        FINAL_LEVEL
    };

    public enum audioType { 
        MENU_MUSIC, 
        GAME_MUSIC,
        SOUND_EFFECT
    };

    public Dictionary<assetType, AssetCollection> assetCollections;
    public Dictionary<audioType, AudioAssetCollection> audioAssetCollections;
    

    public AssetLibrary()
    {
        init();
    }

    /** 
     * initializes the AssetCollections Dictionary object and calls the methods that propigate all the Assets and
     * AssetCollections used in Colossal Crisis
     */
    private void init()
    {
        assetCollections = new Dictionary<assetType, AssetCollection>();
        audioAssetCollections = new Dictionary<audioType, AudioAssetCollection>();
        propagateCollections();
        propagateAssets();
    }

    /** 
     * adds an AssetCollection to the AssetCollection Dictionary object and labels it with assetType Enum
     */
    public void addAssetCollection(assetType collectionName, AssetCollection assetCollection)
    {
        assetCollections.Add(collectionName, assetCollection);
    }

    /**
     * returns an AssetCollection using a particular assetType Enum
     */
    public AssetCollection get(assetType collectionName)
    {
        return (AssetCollection)assetCollections[collectionName];
    }

    /** 
     * adds an AssetCollection to the AssetCollection Dictionary object and labels it with assetType Enum
     */
    public void addAudioAssetCollection(audioType collectionName, AudioAssetCollection assetCollection)
    {
        audioAssetCollections.Add(collectionName, assetCollection);
    }
    /**
     * returns an AssetCollection using a particular assetType Enum
     */
    public AudioAssetCollection getAudio(audioType collectionName)
    {
        return (AudioAssetCollection)audioAssetCollections[collectionName];
    }

    /**
     * propagates all AssetsCollections used by ColossalCrisis
     */
    public void propagateCollections()
    {
        /*addAssetCollection(assetType.BUILDING, new AssetCollection());
        addAssetCollection(assetType.PROFESSOR, new AssetCollection());
        addAssetCollection(assetType.SEWER, new AssetCollection());
         * */
        addAssetCollection(assetType.GUI, new AssetCollection());
        addAssetCollection(assetType.HERO, new AssetCollection());
        addAssetCollection(assetType.STATIC_WORLD_OBJECTS, new AssetCollection());
        addAssetCollection(assetType.LOADING_DOCK, new AssetCollection());
        addAssetCollection(assetType.MENU, new AssetCollection());
        addAssetCollection(assetType.ARROW, new AssetCollection());
        addAssetCollection(assetType.USE, new AssetCollection());
        addAssetCollection(assetType.OUTLINE, new AssetCollection());
        addAssetCollection(assetType.DEBRIS, new AssetCollection());
        addAssetCollection(assetType.STREET, new AssetCollection());
        addAssetCollection(assetType.TEST, new AssetCollection());
        addAssetCollection(assetType.MISSION_OBJECT, new AssetCollection());
        addAssetCollection(assetType.ENVIRONMENT, new AssetCollection());
        addAssetCollection(assetType.STEVE, new AssetCollection());
        addAssetCollection(assetType.HAZARD, new AssetCollection());
        addAssetCollection(assetType.PARTICLES, new AssetCollection());
        addAssetCollection(assetType.FINAL_LEVEL, new AssetCollection());
        addAssetCollection(assetType.PROFESSOR, new AssetCollection());


        addAudioAssetCollection(audioType.MENU_MUSIC, new AudioAssetCollection());
        addAudioAssetCollection(audioType.GAME_MUSIC, new AudioAssetCollection());
        addAudioAssetCollection(audioType.SOUND_EFFECT, new AudioAssetCollection());
    }

    /**
     * propagates all Assets used by ColossalCrisis
     */
    public void propagateAssets()
    {
        // Professor assets
        ((AssetCollection)assetCollections[assetType.PROFESSOR]).addAsset("profStasis", new Asset(@"graphics/profIdleSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.PROFESSOR]).addAsset("profFacePalm", new Asset(@"graphics/profFacePalmSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.PROFESSOR]).addAsset("profPoint", new Asset(@"graphics/profPointingSpriteSheet"));
        ((AssetCollection)assetCollections[assetType.PROFESSOR]).addAsset("profButton", new Asset(@"graphics/profRemoteSpriteSheet"));//implemented

        // Menu assets
        ((AssetCollection)assetCollections[assetType.MENU]).addAsset("mainScreenArrows", new Asset(@"graphics/mainMenuArrows"));
        ((AssetCollection)assetCollections[assetType.MENU]).addAsset("mainScreen", new Asset(@"graphics/mainScreen"));
        ((AssetCollection)assetCollections[assetType.MENU]).addAsset("settingsScreen", new Asset(@"graphics/settingsScreen"));
        ((AssetCollection)assetCollections[assetType.MENU]).addAsset("creditsScreen", new Asset(@"graphics/creditsScreen"));
        ((AssetCollection)assetCollections[assetType.MENU]).addAsset("controlsScreen", new Asset(@"graphics/controlsScreen"));

        // Test assets
        ((AssetCollection)assetCollections[assetType.LOADING_DOCK]).addAsset("loading dock", new Asset(@"graphics/loadingDock"));//implemented
        ((AssetCollection)assetCollections[assetType.ARROW]).addAsset("arrow", new Asset(@"graphics/in_game_arrow"));//implemented
        ((AssetCollection)assetCollections[assetType.USE]).addAsset("interact", new Asset(@"graphics/buttonX"));//implemented
        ((AssetCollection)assetCollections[assetType.USE]).addAsset("use", new Asset(@"graphics/buttonY"));//implemented
        ((AssetCollection)assetCollections[assetType.OUTLINE]).addAsset("outline", new Asset(@"graphics/outline"));//implemented
        ((AssetCollection)assetCollections[assetType.DEBRIS]).addAsset("debris", new Asset(@"graphics/debris"));//implemented
        ((AssetCollection)assetCollections[assetType.STREET]).addAsset("street", new Asset(@"graphics/street"));//implemented
        ((AssetCollection)assetCollections[assetType.TEST]).addAsset("testexplosion", new Asset(@"graphics/testexplosion"));//implemented

        
        // Hero assets
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroRunTest", new Asset(@"graphics/heroRunTestSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroIdleTest", new Asset(@"graphics/heroIdleTestSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroJump", new Asset(@"graphics/heroJumpSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroDead", new Asset(@"graphics/heroDeadSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroDeadFlat", new Asset(@"graphics/heroDeadFlatSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroHoldingIdle", new Asset(@"graphics/heroHoldingIdleSprite"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroHoldingJump", new Asset(@"graphics/heroHoldingJumpSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroHoldingRun", new Asset(@"graphics/heroHoldingRunSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroBurning", new Asset(@"graphics/heroDeathFireSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroDeadBurned", new Asset(@"graphics/heroDeadFireLastSprite"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroElectrocuting", new Asset(@"graphics/heroDeathElectrocuteSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HERO]).addAsset("heroMelting", new Asset(@"graphics/heroDeathAcidSpriteSheet"));//implemented

        // Mission Object assets
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("tv", new Asset(@"graphics/tvAnimSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("bear", new Asset(@"graphics/teddy"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("dumpsterClosed", new Asset(@"graphics/dumpsterClosed"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("dumpsterOpen", new Asset(@"graphics/dumpsterOpen"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("truck", new Asset(@"graphics/truck"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("laptopSpriteSheet", new Asset(@"graphics/laptopSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("refrigeratorClosed", new Asset(@"graphics/refrigeratorClosed"));//implemented
        ((AssetCollection)assetCollections[assetType.MISSION_OBJECT]).addAsset("refrigeratorOpen", new Asset(@"graphics/refrigeratorOpen"));//implemented

        // Environment assets
        ((AssetCollection)assetCollections[assetType.ENVIRONMENT]).addAsset("shadow", new Asset(@"graphics/shadow"));//implemented
        ((AssetCollection)assetCollections[assetType.ENVIRONMENT]).addAsset("doorOpen", new Asset(@"graphics/doorOpen"));

        // GUI assets
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("miniMapFrame", new Asset(@"graphics/miniMapFrame"));
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("miniMapSteveWarning", new Asset(@"graphics/miniMapSteveWarning"));
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("miniMapAirStrikeWarning", new Asset(@"graphics/miniMapAirStrikeWarning"));
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("miniMapMissionObjectiveDot", new Asset(@"graphics/miniMapMissionObjectiveDot"));
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("miniMapCityBG", new Asset(@"graphics/miniMapCityBG"));
        ((AssetCollection)assetCollections[assetType.GUI]).addAsset("pauseMenu", new Asset(@"graphics/pauseMenu"));

        // Static world object assets
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("bench", new Asset(@"graphics/bench"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("electricPole", new Asset(@"graphics/electricPole"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("electricPoleNWires", new Asset(@"graphics/poleNwires"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("electricWiresHanging", new Asset(@"graphics/electricWiresHanging"));
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("largeDebris2", new Asset(@"graphics/largeDebris2"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("largeDebris3", new Asset(@"graphics/largeDebris3"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("largeDebris4", new Asset(@"graphics/largeDebris4"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("Debris2", new Asset(@"graphics/debris2"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("Debris3", new Asset(@"graphics/debris3"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("Debris4", new Asset(@"graphics/debris4"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("Debris5", new Asset(@"graphics/debris5"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("mailbox", new Asset(@"graphics/mailbox"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("streetLight", new Asset(@"graphics/streetLight"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("trashCan", new Asset(@"graphics/trashCan"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("building1", new Asset(@"graphics/building1"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("building2", new Asset(@"graphics/building2"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("powerPoleDowned", new Asset(@"graphics/powerPoleDowned"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("dynamiteSpriteSheet", new Asset(@"graphics/dynamiteSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("regentronStaticSpriteSheet", new Asset(@"graphics/regentronStaticSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("regentronChargingSpriteSheet", new Asset(@"graphics/regentronChargingSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.STATIC_WORLD_OBJECTS]).addAsset("oozeContainer", new Asset(@"graphics/oozeContainer"));//implemented
        
        // Hazard assets
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("fireSpriteSheet", new Asset(@"graphics/fireSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("powerLinesDownedSpriteSheet", new Asset(@"graphics/powerLinesDownedSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("oozeSpriteSheet", new Asset(@"graphics/oozeSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("explosionSpriteSheet", new Asset(@"graphics/explosionSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("nukeExplosion1", new Asset(@"graphics/nukeExplosion1"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("nukeExplosion2", new Asset(@"graphics/nukeExplosion2"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("nukeExplosion3", new Asset(@"graphics/nukeExplosion3"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("nukeMissile", new Asset(@"graphics/nukeMissile"));//implemented
        ((AssetCollection)assetCollections[assetType.HAZARD]).addAsset("nukeScreenWashout", new Asset(@"graphics/nukeScreenWashout"));

        // Particle assets
        ((AssetCollection)assetCollections[assetType.PARTICLES]).addAsset("dustImpactSpriteSheet", new Asset(@"graphics/dustImpactSpriteSheet"));//implemented
        ((AssetCollection)assetCollections[assetType.PARTICLES]).addAsset("teleportSpriteSheet", new Asset(@"graphics/teleportSpriteSheet"));//implemented

        // Steve assets
        ((AssetCollection)assetCollections[assetType.STEVE]).addAsset("steve", new Asset(@"graphics/SteveFootTaller"));//implemented

        // Final Level assets
  
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("robotBody", new Asset(@"graphics/robotBody"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("robotLeftArm", new Asset(@"graphics/robotLeftArm"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("robotRightArm", new Asset(@"graphics/robotRightArm"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("steveBody", new Asset(@"graphics/steveBody"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("steveInnerArm", new Asset(@"graphics/steveInnerArm"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("steveOuterArm", new Asset(@"graphics/steveOuterArm"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelForeground", new Asset(@"graphics/finalLevelForeground"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelBackground", new Asset(@"graphics/finalLevelBackground"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelPowerBar1", new Asset(@"graphics/finalLevelPowerBar1"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelPowerBar2", new Asset(@"graphics/finalLevelPowerBar2"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelPowerBarBG", new Asset(@"graphics/finalLevelPowerBarBG"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelPowerBarFrame", new Asset(@"graphics/finalLevelPowerBarFrame"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelFightText", new Asset(@"graphics/finalLevelFightText"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelWinText", new Asset(@"graphics/finalLevelWinText"));
        ((AssetCollection)assetCollections[assetType.FINAL_LEVEL]).addAsset("finalLevelLoseText", new Asset(@"graphics/finalLevelLoseText"));
        
        // Audio assets
        ((AudioAssetCollection)audioAssetCollections[audioType.MENU_MUSIC]).addAsset("mainMenuMusic", new AudioAsset(@"audio/231212_MarchingSiegers"));
        ((AudioAssetCollection)audioAssetCollections[audioType.GAME_MUSIC]).addAsset("gameMusic", new AudioAsset(@"audio/232836_TheUnbreakables"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("footstep_close", new AudioAsset(@"audio/footstep_close"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("footstep_far", new AudioAsset(@"audio/footstep_far"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("prof_facePalm", new AudioAsset(@"audio/prof_facePalm"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("prof_regen", new AudioAsset(@"audio/prof_regen"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("transporter", new AudioAsset(@"audio/transporter"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("menu_click", new AudioAsset(@"audio/menu_click"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("menu_select", new AudioAsset(@"audio/menu_select"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("dynamite_explode", new AudioAsset(@"audio/dynamite_explode"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("steve_longRoar1", new AudioAsset(@"audio/steve_longRoar1"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("steve_longRoar2", new AudioAsset(@"audio/steve_longRoar2"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("steve_quickRoar", new AudioAsset(@"audio/steve_quickRoar"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("death_scream", new AudioAsset(@"audio/death_scream"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("death_squish", new AudioAsset(@"audio/death_squish"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("death_ooze", new AudioAsset(@"audio/death_ooze"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("death_zap", new AudioAsset(@"audio/death_zap"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("punch1", new AudioAsset(@"audio/punch1"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("punch2", new AudioAsset(@"audio/punch2"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("punch3", new AudioAsset(@"audio/punch3"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("punch4", new AudioAsset(@"audio/punch4"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("final_game_bell", new AudioAsset(@"audio/final_game_bell"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("robot_start", new AudioAsset(@"audio/robot_start"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("game_lose", new AudioAsset(@"audio/game_lose"));
        ((AudioAssetCollection)audioAssetCollections[audioType.SOUND_EFFECT]).addAsset("game_victory", new AudioAsset(@"audio/game_victory"));
    }
    
    /**
     * This method is only called within the Draw() method of XNA's Game object. It goes through all Asset objects 
     * in the AssetCollections, loads their Sprites into the XNA Content Pipeline using the Asset's filename, and returns the resulting 
     * Texture2D object to the Asset object's spritesheet member. 
     */
    public void loadAssetImagesFromDisk(ContentManager content)
    {
        List<AssetCollection> acList = new List<AssetCollection>(assetCollections.Values);
        foreach (AssetCollection ac in acList){
            List<Asset> aList = new List<Asset>(ac.assets.Values);
            foreach (Asset a in aList)
            {
                a.spriteSheet = content.Load<Texture2D>(a.fileName);
            }
        }
    }

    public void loadSoundAndMusic(ContentManager content)
    {
        List<AudioAssetCollection> acList = new List<AudioAssetCollection>(audioAssetCollections.Values);
        foreach (AudioAssetCollection ac in acList)
        {
            List<AudioAsset> aList = new List<AudioAsset>(ac.assets.Values);
            foreach (AudioAsset a in aList)
            {
                a.sound = content.Load<SoundEffect>(a.fileName);
            }
        }
    }

}

